//
//  AutoHeight_string.m
//  OurMenu
//
//  Created by 尹坤 on 15/10/9.
//  Copyright © 2015年 尹坤. All rights reserved.
//

#import "AutoHeight_string.h"

@implementation AutoHeight_string
-(CGFloat)getRowHeight:(CGFloat)howBig width:(CGFloat)width content:(NSString *)content
{
    CGSize size = CGSizeMake(width, 10000);
    NSDictionary *dic = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:howBig] forKey:NSFontAttributeName];
    CGRect rc = [content boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return rc.size.height;
}

@end
